//
//  SMCHUD.h
//  SMCKit
//
//  Created by Ren JianSheng on 12-4-16.
//  Copyright (c) 2012年 3gtv.net. All rights reserved.
//


#import <UIKit/UIKit.h>
#import <AvailabilityMacros.h>

#define SMCAlertHUD(message)        [SMCHUD showTipsWithStatus:message]
#define SMCAlertSuccessHUD(message) [SMCHUD showSuccessWithStatus:message]
#define SMCAlertErrorHUD(message)   [SMCHUD showErrorWithStatus:message]

enum {
    SMCHUDMaskTypeNone = 1, // allow user interactions while HUD is displayed
    SMCHUDMaskTypeClear, // don't allow
    SMCHUDMaskTypeBlack, // don't allow and dim the UI in the back of the HUD
    SMCHUDMaskTypeGradient // don't allow and dim the UI with a a-la-alert-view bg gradient
};

typedef NSUInteger SMCHUDMaskType;

@interface QLHUD : UIView

+ (void)show;
+ (void)showWithStatus:(NSString*)status;
+ (void)showWithStatus:(NSString*)status maskType:(SMCHUDMaskType)maskType;
+ (void)showWithMaskType:(SMCHUDMaskType)maskType;


+ (void)showTipsWithStatus:(NSString*)string;
+ (void)showTipsWithStatus:(NSString *)string duration:(NSTimeInterval)duration;
+ (void)showSuccessWithStatus:(NSString*)string;
+ (void)showSuccessWithStatus:(NSString *)string duration:(NSTimeInterval)duration;
+ (void)showErrorWithStatus:(NSString *)string;
+ (void)showErrorWithStatus:(NSString *)string duration:(NSTimeInterval)duration;

+ (void)setStatus:(NSString*)string; // change the HUD loading status while it's showing

+ (void)dismiss; // simply dismiss the HUD with a fade+scale out animation
+ (void)dismissWithSuccess:(NSString*)successString; // also displays the success icon image
+ (void)dismissWithSuccess:(NSString*)successString afterDelay:(NSTimeInterval)seconds;
+ (void)dismissWithError:(NSString*)errorString; // also displays the error icon image
+ (void)dismissWithError:(NSString*)errorString afterDelay:(NSTimeInterval)seconds;

+ (BOOL)isVisible;


@end
